GETTING STARTED
===============

This is the sample application that demonstrates the use of the BSF Tag Library.

Requires Java 5 minimum due to using language features such as enhanced for-loop

Instructions are based on Ubuntu 9.04 + clean Tomcat 6 installation from the repository.

First, it is necessary to disable the security manager for Tomcat. None of the scripting 
examples work with an active security manager. On Ubuntu, this is done by editing 
/etc/init.d/tomcat6 and changing the line TOMCAT6_SECURITY=yes to TOMCAT6_SECURITY=no

Next, the binary distribution comes with a ready-to-go Web Archive (bsftaglib-example.war)
which can be simply hotdropped into Tomcat's webapps directory. 

On Ubuntu: /var/lib/tomcat6/webapps

Tomcat will deploy the application automatically, after which it can be reached at

http://localhost:8080/bsftaglib-example

It's not necessary to restart Tomcat, but it can be done anyway: 

sudo /etc/init.d/tomcat6 restart

The Rexx examples require ooRexx and BSF4ooRexx to be installed.

The Rexx examples also require the BSF.CLS class to be present on the path, for instance in /usr/bin


SOURCE DISTRIBUTION
===================

The source distribution contains only the source files. In order to get it running, it is first 
necessary to follow the instructions in the section "manual compilation and deployment" below.

BSF.CLS from the BSF4ooRexx distribution is needed, to be made available to the program as previously described.

The following files must be obtained and placed into the web application's WEB-INF/lib:

bsf.jar from the BSF 2.4+ distribution. This file must be modified in the manner specified in the section
"special note on quercusengine" below.

commons-logging Jar file from Apache Commons Logging project, version 1.1.1 or later.

jython.jar from Jython version 2.2 (later ones do NOT work with BSF). 

resin.jar from Caucho Resin project.

ScriptProviderForooRexx.jar or similar Jar from BSF4ooRexx distribution. 



PROBLEM WITH REXX ON LINUX
==========================

Current version of BSF4ooRexx for Linux erroneously has two 64-bit shared libraries (libBSF4ooRexx.so) 
instead of a 32-bit version, therefore it is necessary to either compile a 32-bit version from source 
or use an older version.


SPECIAL NOTE ON QUERCUSENGINE
=============================

When running QuercusEngine on BSF Taglib, there is no entry point at which it is possible to call

BSFManager.registerScriptingEngine("php", "org.apache.bsf.engines.quercus.QuercusEngine", null); 

so it's not possible to register the script engine programatically.The BSF distribution must be 
altered and the line 

php = org.apache.bsf.engines.quercus.QuercusEngine, php

added to the org/apache/bsf/Languages.properties file. For the bsf.jar included in the WEB-INF/lib 
directory, this has already been done.


MANUAL COMPILATION AND DEPLOYMENT
=================================

src/main/java contains the class files to compile. Classpath must contain the Servlet API for this to work.

After that, simply create new application directory ie. 

/var/lib/tomcat6/webapps/bsftaglib-example

and copy contents of src/main/webapp there. compiled class files go into

/var/lib/tomcat6/webapps/bsftaglib-example/WEB-INF/classes



LICENSE
=======

The code is public domain. 

